package com.translate.web.api.controller;

import java.util.List;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.response.vo.ResponseModel;
import com.translate.web.service.ICustomerLabelService;
import com.translate.vo.CustomerLabelVO;
import com.translate.vo.contract.ICustomerLabelVO;

@RestController
@RequestMapping("customerLabel")
public class CustomerLabelController {

	private ICustomerLabelService customerLabelService;
	
	public CustomerLabelController(ICustomerLabelService customerLabelService) {
		this.customerLabelService = customerLabelService;
	}
	
	@PostMapping("getCustomerLabels")
	public ResponseModel<List<ICustomerLabelVO>> getCustomerLabels() {
		
		return ResponseModel.<List<ICustomerLabelVO>>success(this.customerLabelService.getCustomerLabelsToCache(CustomerLabelVO.class));
	}
}
